<?php
require_once '../config.php';
require_once '../dao/dao_db.php';
require_once '../dao/dao_qa.php';
session_start();
session_cache_limiter('private');
if($_POST['comment']!=''){
	$comment=$_POST['comment'];
}
if($_POST['titleid']!=''){
	$titleid=$_POST['titleid'];
}
if(isset($_SESSION['userid'])&&trim($comment)!=''){
	save_question_comment($titleid,$comment,$_SESSION['userid']);
	mysql_close();
	header("LOCATION:../discussion.php?qid=$titleid");
}else{
	//header("location:../error.php?errcode=2");
}
?>